from PyQt5 import QtWidgets
from ui_py.report_ui import Ui_Dialog
import os
class OpenReport(QtWidgets.QDialog, Ui_Dialog):
    def __init__(self):
        QtWidgets.QDialog.__init__(self)
        self.setupUi(self)
        self.pushButton_2.clicked.connect(self.closeIt)
        self.pushButton.clicked.connect(self.open_pdf)
    def closeIt(self):
        self.close()
    def open_pdf(self):
        os.startfile(os.path.normpath('data/report.pdf'))
        self.close()